<%@ page import="com.luojiaoj.subject.Subject" %>



<div class="fieldcontain ${hasErrors(bean: subjectInstance, field: 'title', 'error')} ">
	<label for="title">
		<g:message code="subject.title.label" default="Title" />
		
	</label>
	<g:textField name="title" maxlength="32" value="${subjectInstance?.title}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: subjectInstance, field: 'content', 'error')} ">
	<label for="content">
		<g:message code="subject.content.label" default="Content" />
		
	</label>
	<g:textArea name="content" cols="40" rows="5" maxlength="65535" value="${subjectInstance?.content}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: subjectInstance, field: 'tags', 'error')} ">
	<label for="tags">
		<g:message code="subject.tags.label" default="Tags" />
		
	</label>
	<g:select name="tags" from="${com.luojiaoj.subject.Tag.list()}" multiple="multiple" optionKey="id" size="5" value="${subjectInstance?.tags*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: subjectInstance, field: 'sampleTest', 'error')} ">
	<label for="sampleTest">
		<g:message code="subject.sampleTest.label" default="Sample Test" />
		
	</label>
	<g:textField name="sampleTest" value="${subjectInstance?.sampleTest}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: subjectInstance, field: 'source', 'error')} ">
	<label for="source">
		<g:message code="subject.source.label" default="Source" />
		
	</label>
	<g:textField name="source" value="${subjectInstance?.source}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: subjectInstance, field: 'author', 'error')} ">
	<label for="author">
		<g:message code="subject.author.label" default="Author" />
		
	</label>
	<g:select id="author" name="author.id" from="${com.luojiaoj.User.list()}" optionKey="id" value="${subjectInstance?.author?.id}" class="many-to-one" noSelection="['null': '']"/>
</div>

<div class="fieldcontain ${hasErrors(bean: subjectInstance, field: 'category', 'error')} required">
	<label for="category">
		<g:message code="subject.category.label" default="Category" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="category" name="category.id" from="${com.luojiaoj.subject.Category.list()}" optionKey="id" required="" value="${subjectInstance?.category?.id}" class="many-to-one"/>
</div>

